//
//  FQDCommentFromMeCell.m
//  FakeQDaily
//
//  Created by mewxiv on 9/28/16.
//  Copyright © 2016 Xensius. All rights reserved.
//

#import "FQDCommentFromMeHeaderCell.h"

#import "Masonry.h"

@interface FQDCommentFromMeHeaderCell ()

@property (nonatomic, strong) UITableViewCell *innerCell;

@end

@implementation FQDCommentFromMeHeaderCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self prepareCell];
    }
    return self;
}

- (void)prepareCell
{
    UIImage *commentImage = [UIImage imageNamed:@"comment"];
    _innerCell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
                                            reuseIdentifier:@"UITableViewCell"];
    _innerCell.textLabel.font = FQDRegularFontWithSize(14.0f);
    _innerCell.textLabel.text = @"我发出的评论";
    _innerCell.imageView.image = commentImage;
    _innerCell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    _innerCell.userInteractionEnabled = NO;
    [self.contentView addSubview:_innerCell];
    self.backgroundColor = [UIColor whiteColor];
    
    WeakSelf;
    [_innerCell mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(weakSelf.contentView).offset(5);
        make.left.equalTo(weakSelf.contentView).offset(5);
        make.right.equalTo(weakSelf.contentView).offset(-5);
        make.bottom.equalTo(weakSelf.contentView);
    }];
    
}

+ (NSString *)reuseId
{
    return @"FQDCommentFromMeHeaderCell";
}

@end
